package br.biofoco.p2p.peer;

import java.io.IOException;

import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.DeserializationContext;
import org.codehaus.jackson.map.JsonDeserializer;

public class CustomIDDeserializer extends JsonDeserializer<ID> {

	@Override
	public ID deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {		
		return IDFactory.fromString(jp.getText());
	}

}
